//
//  UIImageView.swift
//  TCCKit
//
//  Created by tucici on 2023/1/17.
//

import UIKit
private var imageNameKey = "imageNameKey"
extension UIImageView{
    var imageName:String{
        set{
            objc_setAssociatedObject(self, &imageNameKey, newValue, .OBJC_ASSOCIATION_COPY_NONATOMIC)
            if newValue == ""{self.image = nil}
            else{self.image = UIImage(named: newValue)}
        }get{
            return objc_getAssociatedObject(self, &imageNameKey) as? String ?? ""
        }
    }
}
